<%--
  Created by IntelliJ IDEA.
  User: Sarah
  Date: 2023/3/29
  Time: 17:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <base href="<%= basePath %>"/>
    <title>文件下载</title>
</head>
<%--块元素：
    行元素：
     行内块：
--%>
<body>
<c:forEach items="${files}" var="file">
    <div style="margin-left: 20px;" >
        <img style="width: 300px;height: 300px" src="static/images/${file.getName()}"/>
        <a href="download?filename=${file.getName()}">下载</a>
    </div>

</c:forEach>

</body>
</html>